<template>
	<view class="video-container">
		<video :src="videoUrl" controls :autoplay="false" :show-fullscreen-btn="true" :enable-progress-gesture="true"
			class="video-player" @error="asd"></video>
	</view>
</template>

<script setup>
	import {
		onLoad
	} from '@dcloudio/uni-app';
	import {
		ref
	} from 'vue';

	const videoUrl = ref('');

	onLoad((options) => {
		videoUrl.value = encodeURI(decodeURIComponent(options.videoUrl));
		console.log(videoUrl.value)
	});

	const asd = (e) => {
		console.log(e);
	}
</script>

<style lang="scss">
	.video-container {
		padding-top: calc(var(--status-bar-height, 44px) + 20rpx);
		padding: 16px;
	}

	.video-player {
		width: 100%;
		height: 400rpx;
		background-color: #000;
		border-radius: 12px;
	}
</style>